﻿<UserControl x:Class="YLServerInterface.UserControls.ImageCutter"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" 
             x:Name="myc"
             d:DesignHeight="178" d:DesignWidth="365" Loaded="UserControl_Loaded" BorderThickness="3" BorderBrush="#FF838383">

    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="auto"/>
            <RowDefinition Height="auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>
        <Label Grid.Row="0" Name="labTitle" Content="原始分辨率" Height="28" HorizontalAlignment="Stretch"    Background="#FFA6ABB1" Foreground="White" FontSize="14" HorizontalContentAlignment="Center" />
        <Label Grid.Row="1" Name="lblCutResolution" Content="裁剪分辨率" Height="28" HorizontalAlignment="Stretch"    Background="#FFA6ABB1" Foreground="White" FontSize="14" HorizontalContentAlignment="Center" />

        <Grid Grid.Row="2" Background="#FFE2E2E2">
            
            <Image    Name="img" Stretch="Fill" SizeChanged="img_SizeChanged"  />
            <Rectangle   Name="rect"
                MouseDown="rect_MouseDown" StrokeThickness="0" Stroke="Red"  Fill="#FF00FFEC" OpacityMask="White" Opacity="0.3"  HorizontalAlignment="Left" VerticalAlignment="Top" MouseWheel="rect_MouseWheel" />
            <Label Content="图片分辨率不符合裁剪要求。" Height="Auto" HorizontalAlignment="Center" Margin="0" Name="labError" VerticalAlignment="Center" FontSize="20" Visibility="Hidden" />
        </Grid>
    </Grid>
</UserControl>

    